package erz.printing.police.settings;

import android.content.Context;
import android.content.SharedPreferences;

public class SettingPreferences {
    public static String PHOTO_PRINT_DPI_KEY = "photo_print_dpi";

    private SharedPreferences settings;


    public SettingPreferences(Context context) {
        settings = context.getSharedPreferences("settings", Context.MODE_PRIVATE);
    }

    public void put(String key, int val) {
        SharedPreferences.Editor editor = settings.edit();
        editor.putInt(key, val);
        editor.apply();
    }

    public int getInt(String key, int defVal) {
        return settings.getInt(key, defVal);
    }
}
